//
//  CPSCAll2CategoryRightICollectionCell.m
//  CollTest
//
//  Created by codew on 11/11/21.
//

#import "CPSCAll2CategoryRightICollectionCell.h"

@interface CPSCAll2CategoryRightICollectionCell ()

@property (weak, nonatomic) IBOutlet UIView *viewContent;

@property (weak, nonatomic) IBOutlet UIImageView *imageIconView;
@property (weak, nonatomic) IBOutlet UILabel *lblName;

@end

@implementation CPSCAll2CategoryRightICollectionCell


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.imageIconView.layer.cornerRadius = 18;
    self.imageIconView.layer.masksToBounds = YES;
    
//    self.viewContent.backgroundColor = kCPSCRandomColor;
//    NSInteger index = arc4random_uniform(5);
//    NSString * imageName = [NSString stringWithFormat:@"ctgg%zd", index];
//    self.imageIconView.image = [UIImage imageNamed:imageName];
}

- (void)updateCellWithItem:(id<CPSCAll2CategoryRightViewUIModelProtocol>)item
{
    NSURL * urlImage = [NSURL URLWithString: item.urlStringRecommend];
    [self.imageIconView sd_setImageWithURL:urlImage placeholderImage:[UIImage imageNamed:@"ctgg1"]];
    
    self.lblName.text = item.stringTitleRecommend;
}

@end
